From 88449ac17bf7aad429eb588ec19a0a29d5d90ed4 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 27 Jun 2023 20:01:55 +0100 Subject: Allocate memory for closures --- ...mpiler.testing.snapshots.Snapshotter)].expected | 47 ++++++++++++++-------- 1 file changed, 30 insertions(+), 17 deletions(-) (limited to 'snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected') diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected index 3485b7f0..8ef7bbc3 100644 --- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -6,31 +6,44 @@ Section Details: Type[2]: - type[0] (i32) -> i32 - type[1] () -> nil -Import[2]: +Import[3]: - table[0] type=funcref initial=0 <- env.__indirect_function_table + - func[0] sig=0 <- env.shed__runtime__alloc - memory[0] pages: initial=0 <- env.__linear_memory Function[2]: - - func[0] sig=0 - - func[1] sig=1 + - func[1] sig=0 + - func[2] sig=1 Code[2]: - - func[0] size=5 - - func[1] size=2 + - func[1] size=5 + - func[2] size=16 Custom: - name: "name" - - func[0] - - func[1] - - func[0] local[0] + - func[0] + - func[1] + - func[2] + - func[1] local[0] + - func[2] local[0] Custom: - name: "linking" - - symbol table [count=2] - - 0: F func=0 [ binding=global vis=default ] - - 1: F func=1 [ binding=global vis=default ] + - symbol table [count=3] + - 0: F func=0 [ undefined explicit_name binding=global vis=default ] + - 1: F func=1 [ binding=global vis=default ] + - 2: F func=2 [ binding=global vis=default ] +Custom: + - name: "reloc.CODE" + - relocations for section: 3 (Code) [1] + - R_WASM_FUNCTION_INDEX_LEB offset=0x000016(file=0x000097) symbol=0 Code Disassembly: -00006c func[0] : - 00006d: 41 00 | i32.const 0 - 00006f: 0f | return - 000070: 0b | end -000076 func[1] : - 000077: 0b | end \ No newline at end of file +000087 func[1] : + 000088: 41 00 | i32.const 0 + 00008a: 0f | return + 00008b: 0b | end +000091 func[2] : + 000092: 01 7f | local[0] type=i32 + 000094: 41 04 | i32.const 4 + 000096: 10 80 80 80 80 00 | call 0 + 00009c: 21 00 | local.set 0 + 00009e: 20 00 | local.get 0 + 0000a0: 0b | end \ No newline at end of file -- cgit v1.2.3